FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS builder

WORKDIR /src

COPY MalwareMultiScan.Scanner /src/MalwareMultiScan.Scanner
COPY MalwareMultiScan.Backends /src/MalwareMultiScan.Backends

RUN dotnet publish -c Release -r linux-x64 -o ./publish MalwareMultiScan.Scanner/MalwareMultiScan.Scanner.csproj

FROM mcr.microsoft.com/dotnet/core/runtime:3.1

WORKDIR /worker

COPY --from=builder /src/publish /worker

ENTRYPOINT ["/worker/MalwareMultiScan.Scanner"]